<template>
	<view>
		<view class="banner">
			<swiper class="screen-swiper square-dot" indicator-dots="true" circular="true" autoplay="true" interval="5000"
			 duration="500">
				<swiper-item v-for="(item,index) in bannerList" :key="index">
					<!-- {{item.image}} -->
					<image :src="item.url" mode="aspectFill"></image>
					<!-- <video src="{{item.url}}" autoplay loop muted show-play-btn="{{false}}" controls="{{false}}" objectFit="cover" wx:if="{{item.type=='video'}}"></video> -->
				</swiper-item>
			</swiper>
		</view>
	</view>
</template>

<script>
	export default {
		name: 'banner',
		components: {},
		data() {
			return {
				swiperList: [{
						id: 0,
						type: 'image',
						url: '/static/img/banner_01.png'
					},
					{
						id: 1,
						type: 'image',
						url: '/static/img/banner_02.png'
					},
					{
						id: 2,
						type: 'image',
						url: '/static/img/banner_03.png'
					},
					{
						id: 3,
						type: 'image',
						url: '/static/img/banner_04.png'
					},
					{
						id: 4,
						type: 'image',
						url: '/static/img/banner_01.png'
					},
					{
						id: 5,
						type: 'image',
						url: '/static/img/banner_01.png'
					}
				],
			}
		},
		props: {
			bannerList: {
				type: Array,
				default: []
			}
		},
		watch: {
			
		},
		computed: {
			
		},
		methods: {

		}
	}
</script>

<style scoped lang="scss">
	.banner {
		padding: 0 25rpx;
		height: 260rpx;
		margin-bottom: 30rpx;
		// margin: -200rpx auto 20rpx;
		border-radius: 10rpx;
		overflow: hidden;

		.screen-swiper {
			height: 100%;
			min-height: 100% !important;

			image {
				height: 260rpx;
				border-radius: 10rpx;
			}
		}
	}
</style>
